package com.cn.jiyun.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.cn.jiyun.entity.pojo.Meals;
import com.cn.jiyun.entity.pojo.Vouchers;
import com.cn.jiyun.mapper.FoodMapper;
import com.cn.jiyun.service.FoodService;

import com.cn.jiyun.entity.pojo.Food;
import com.jiyun.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * 针对表【-Hotel】的业务操作的Service实现类
 *
 * @author lxy
 * @since 2025-01-17
 */
@Service
public class FoodServiceImpl extends ServiceImpl<FoodMapper, Food> implements FoodService {
  @Autowired
  private  FoodMapper foodMapper;


  @Override
  public List<Food> findAllFood(Food food) {
    List<Food> list = foodMapper.findAllFood();
    return list;
  }



  @Override
  public List<Food> findFoodOrderByRating(Integer rating) {
    List<Food> list = foodMapper.findFoodOrderByRating(rating);
    return list;
  }

  @Override
  public Food getByFoodId(Integer foodId) {

    return foodMapper.getFoodId(foodId);
  }

  @Override
  public List<Vouchers> findVouchers(Vouchers vouchers) {
    return foodMapper.findVouchers(vouchers);
  }

  @Override
  public List<Meals> findMeals(Meals meals) {
    return foodMapper.findMeals(meals);
  }

  @Override
  public Meals getMealById(Integer packageId) {
    return foodMapper.findMealById(packageId);
  }


}
